package factory.simpleFactory;

import factory.bean.Vehicle;

public class Main {
    public static void main(String[] args) {

        //调用者传递想要生产的类名
        Vehicle vehicle = VehicleFactory.create("car");
        vehicle.showInfo();
        Vehicle truck = VehicleFactory.create("truck");
        truck.showInfo();
    }
}
